﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Interactivity;
using Microsoft.Phone.Controls;

namespace PhoneToolkit.Extensions.Behaviors
{
    public class TransitionRollOutBehavior : Behavior<PhoneApplicationPage>
    {
        protected override void OnAttached()
        {
            base.OnAttached();

            NavigationOutTransition navOutTrans = new NavigationOutTransition();
            navOutTrans.Backward = new RollTransition();
            navOutTrans.Forward = new RollTransition();
            TransitionService.SetNavigationOutTransition(this.AssociatedObject, navOutTrans);
        }

        protected override void OnDetaching()
        {
            base.OnDetaching();
        }
    }
}
